﻿/*
 *  PassBag is multi-platform software that securely manage/store passwords
 *  Copyright (C) <2009>  <Hugo Rodrigues PEREIRA>
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *	
 *  You can find a copy of the GPLv3 at project <root directory>/gpl.txt
 *
 */

using System.Windows.Forms;

namespace PassBag.Utils {
    /// <summary>
    /// Helper class to return application path information's.
    /// </summary>
    public class ApplicationPath {

        /// <summary>
        /// Gets the directory.
        /// </summary>
        /// <value>The directory.</value>
        public static string Directory {
            get {
                return Application.StartupPath;
            }
        }

        /// <summary>
        /// Gets the full path.
        /// </summary>
        /// <value>The full path.</value>
        public static string FullPath {
            get {
                return System.IO.Path.GetFullPath (
                System.Reflection.Assembly.GetExecutingAssembly ().GetName ().CodeBase);
            }
        }

        /// <summary>
        /// Gets the name of the executable.
        /// </summary>
        /// <value>The name of the executable.</value>
        public static string ExecutableName {        
            get {                                                
                return System.IO.Path.GetFileName (
                System.Reflection.Assembly.GetExecutingAssembly ().GetName ().CodeBase);
            }
        }

        /// <summary>
        /// Gets the executable name without extension.
        /// </summary>
        /// <value>The executable name without extension.</value>
        public static string ExecutableNameWithoutExtension {
            get {
                return System.IO.Path.GetFileNameWithoutExtension (
                System.Reflection.Assembly.GetExecutingAssembly ().GetName ().CodeBase);
            }
        }


    }
}
